package znbkChangeCollection.ChangeCollectionApi;


import com.example.lancooznbk.service.HttpPostServer;
import com.lancoo.rxretrofitlibrary.Api.BaseApi;
import com.lancoo.rxretrofitlibrary.listener.HttpOnNextListener;
import com.trello.rxlifecycle.components.support.RxAppCompatActivity;
import com.trello.rxlifecycle.components.support.RxFragment;

import retrofit2.Retrofit;
import rx.Observable;
import znbkChangeCollection.ChangeCollectionEntityModel;

/**
 * Created by Administrator on 2018\2\10 0010.
 */

public class ChangeCollectionApi extends BaseApi {

    private ChangeCollectionEntityModel mChangeCollectionEntityModel;

    public ChangeCollectionEntityModel getmChangeCollectionEntityModel() {
        return mChangeCollectionEntityModel;
    }

    public void setmChangeCollectionEntityModel(ChangeCollectionEntityModel mChangeCollectionEntityModel) {
        this.mChangeCollectionEntityModel = mChangeCollectionEntityModel;
    }

    public ChangeCollectionApi(HttpOnNextListener listener, RxAppCompatActivity rxAppCompatActivity) {
        super(listener, rxAppCompatActivity);
    }

    public ChangeCollectionApi(HttpOnNextListener listener, RxFragment rxFragment) {
        super(listener, rxFragment);
    }

    @Override
    public Observable getObservable(Retrofit retrofit) {
        HttpPostServer httpPostServer = retrofit.create(HttpPostServer.class);

        return httpPostServer.changeCollection(mChangeCollectionEntityModel);

    }

}
